﻿using mozhi.smarterp.Business.Enums;
using System;
using System.Collections.Generic;
using System.Text;
using Volo.Abp.Application.Dtos;

namespace mozhi.smarterp.Business.Inventories
{
    public class InventoryRealTimeDto : EntityDto<Guid>
    {
        public Guid ProductId { get;   set; }

        public string ProductCode { get;   set; }

        public string ProductName { get; set; }

        public Guid WarehouseId { get;   set; }

        public string WarehouseCode { get;   set; }

        public string WarehouseName {  get; set; }

        public Guid? LocationId { get;   set; }

        public string LocationName {  get; set; }

        /// <summary>
        /// 入库时间
        /// </summary>
        public DateTime? InboundDate { get;   set; }

        public string BatchNumber { get;   set; }

        public string SerialNumber { get;   set; }

        /// <summary>
        /// 生产日期
        /// </summary>
        public DateTime? ProductionDate { get;   set; }

        /// <summary>
        /// 保质期（天）
        /// </summary>
        public int? ShelfLifeDays { get;   set; }

        /// <summary>
        /// 过期日期
        /// </summary>
        public DateTime? ExpirationDate { get;   set; }

        /// <summary>
        /// 库存单位
        /// </summary>
        public Guid BasicUnitId { get;   set; }


        public string BasicUnitName {  get; set; }

        /// <summary>
        /// 单价
        /// </summary>
        public decimal? Price { get;   set; }

        /// <summary>
        /// 数量
        /// </summary>
        public decimal Quantity { get;   set; }

        /// <summary>
        /// 锁定数量
        /// </summary>
        public decimal LockedQuantity { get;   set; }

        /// <summary>
        /// 可用数量
        /// </summary>
        public decimal AvailableQuantity
        {
            get
            {
                return Quantity - LockedQuantity;
            }
        }

        /// <summary>
        /// 库存金额
        /// </summary>
        public decimal Amount { get;   set; }

        /// <summary>
        /// 库存状态
        /// </summary>
        public InventoryStatusType Status { get;   set; }
    }
}
